package com.lry.pda.bottom.mysql.backend;

import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

@Data
public class FieldExpr {

    private List<String> fields;//空代表*

    public void addFields(List<String> fs){
        for (String f : fs) {
            addField(f);
        }
    }
    public void addField(String field) {
        if(CollectionUtils.isEmpty(fields)){
            this.fields = new ArrayList<>();
        }
        this.fields.add(0,field);
    }
}
